package user

import (
	"mldong/api/base"

	"github.com/gogf/gf/v2/frame/g"
)

type SaveReq struct {
	g.Meta `path:"/sys/user/save" tags:"用户管理" method:"post" summary:"添加用户"`
	UserParam
}
type UpdateReq struct {
	g.Meta `path:"/sys/user/update" tags:"用户管理" method:"post" summary:"修改用户"`
	UserParam
}
type DetailReq struct {
	g.Meta `path:"/sys/user/detail" tags:"用户管理" method:"post" summary:"用户详情"`
	ID     string `json:"id" dc:"用户ID" v:"required#请输入用户ID"`
}

type DetailRes struct {
	base.CommonResult
	Data UserVO `json:"data" dc:"用户信息"`
}
type RemoveReq struct {
	g.Meta `path:"/sys/user/remove" tags:"用户管理" method:"post" summary:"删除用户"`
	Ids    []string `json:"ids" dc:"用户ID集合" v:"required#请输入用户ID集合|min-length:1"`
}
type PageReq struct {
	g.Meta `path:"/sys/user/page" tags:"用户管理" method:"post" summary:"用户分页查询"`
	base.PageParam
	LikeUserName    string   `json:"m_LIKE_userName" dc:"用户名模糊查询"`
	LikeRealName    string   `json:"m_LIKE_realName" dc:"真实姓名模糊查询"`
	EqMobilePhone   string   `json:"m_EQ_mobilePhone" dc:"手机号精确查询"`
	RoleId          string   `json:"-" dc:"角色ID"`
	InUserIdList    []string `json:"-" dc:"用户ID集合"`
	NotInUserIdList []string `json:"-" dc:"用户ID集合"`
}
type UserPageVO struct {
	base.PageVO
	Rows []UserVO `json:"rows" dc:"数据列表"`
}
type PageRes struct {
	base.CommonResult
	Data UserPageVO `json:"data" dc:"用户分页返回实体"`
}

type ResetPasswordReq struct {
	g.Meta `path:"/sys/user/resetPassword" tags:"用户管理" method:"post" summary:"重置用户密码"`
	Ids    []string `json:"ids" dc:"用户ID集合" v:"required#请输入用户ID集合|min-length:1"`
}
type InfoReq struct {
	g.Meta `path:"/sys/user/info" tags:"用户管理" method:"post" summary:"个人-用户信息"`
}
type PermCodeReq struct {
	g.Meta `path:"/sys/user/permCode" tags:"用户管理" method:"post" summary:"个人-权限标识"`
}
type PermCodeRes struct {
	base.CommonResult
	Data []string `json:"data" dc:"权限标识"`
}
